home *** CD-ROM | disk | FTP | other *** search
-
- // Copyright (C) 2002 by Luigi Pino. All Rights Reserved.
-
- /***************************************************************************/
-
- class Sub_Menu_Class {
- public:
- Sub_Menu_Class(); // Constructor
- ~Sub_Menu_Class(); // Deconstructor
-
- bool Add_Choice(int option_index, char *new_info);
- bool Add_Option(char *new_info);
- int Choice_Size(int option_index);
- bool Get_Access_Option(int option_index);
- char* Get_Choice_Info(int option_index);
- char* Get_Option_Info(int option_index);
- int Get_Current_Choice(int option_index);
- int Get_Current_Option();
- void Next_Choice(int option_index);
- void Next_Option();
- int Option_Size();
- void Previous_Choice(int option_index);
- void Previous_Option();
- void Rename_Choice(int option_index, int choice_index, char *update);
- void Rename_Option(int option_index, char *update);
- void Set_Access_Choice(int option_index, int choice_index, bool value);
- void Set_Access_Option(int option_index, bool value);
- void Set_Current_Choice(int option_index, int value);
- void Set_Current_Option(int value);
-
- private:
- typedef struct {
- bool access; // Availability
- char info[30]; // Information
- } Menu_Info_Struct;
-
- typedef struct {
- Menu_Info_Struct *data; // Data
- int current; // Current position
- int size; // Size of list
- } Menu_Choice_Struct;
-
- Menu_Choice_Struct *choices; // Choices data
- Menu_Info_Struct *data; // Option data
- int current; // Current position
- int size; // Size of list
- };
-
- /***************************************************************************/
-
- class Main_Menu_Class {
- public:
- Main_Menu_Class(); // Constructor
- ~Main_Menu_Class(); // Deconstructor
-
- bool Enter_Pressed();
- bool Escape_Pressed();
- Sub_Menu_Class *Get_Current();
- void Set_Current(Sub_Menu_Class *menu);
- void Update();
-
- private:
- Controller_Class input;
- Sub_Menu_Class *current;
- };
-
- /***************************************************************************/